package command;

import org.uc3m.ed.factory.panel.FactoriaPanel;
import org.uc3m.ed.implementacion.Command;
import org.uc3m.ed.interfaz_grafica.ventana.PanelDibujo;
import org.uc3m.ed.interfaz_grafica.ventana.VentanaPrincipal;

public class CommandEliminarHeap implements Command {
	
	/* (non-Javadoc)
	 * @see org.uc3m.ed.implementacion.Command#execute()
	 */
	public void execute() {
		try{
			PanelDibujo panel= FactoriaPanel.metodoFactoria();
			VentanaPrincipal.getConsola().limpiarConsola();
			panel.initPilaComandos();
			panel.setEstructura(null);
			panel.setDimensionDefecto();
			panel.repaint();
		}catch(Exception e){
			VentanaPrincipal.getConsola().escribirTextoError("CLASS::Heap::CommandEliminarABB ERROR::2::"+e.toString()+"\n",e.getStackTrace());
		}catch(Error e){
			VentanaPrincipal.getConsola().escribirTextoError("CLASS::Heap::CommandEliminarABB ERROR::1::"+e.toString()+"\n",e.getStackTrace());
		}
		
	}

}
